package priorityqueue;

import java.util.Comparator;
import java.util.PriorityQueue;

class IntCmp implements Comparator<Student>{


    @Override
    public int compare(Student o1, Student o2) {
        return o1.age - o2.age;
    }
}

public class Test {
    public static void main(String[] args) {
        PriorityQueue<Student> priorityQueue3 = new PriorityQueue<>(new IntCmp());

        MyHeap myHeap = new MyHeap();
        int[] arr = {1,2,3,4,5};
        myHeap.initMyHeap(arr);
        myHeap.createHeap();
        int peek = myHeap.peek();
        System.out.println("abcagyu");

        PriorityQueue<Integer> priorityQueue = new PriorityQueue<>(new Comparator<Integer>() {
            @Override
            public int compare(Integer o1, Integer o2) {
                return o2 - o1;
            }
        });
        PriorityQueue<Integer> priorityQueue1 = new PriorityQueue<>((x,y)->{return x-y;});
        PriorityQueue<Integer> priorityQueue2 = new PriorityQueue<>((x,y)->x.compareTo(y));
        PriorityQueue<Integer> priorityQueue4 = new PriorityQueue<>(Integer::compareTo);

    }
}
